package cn.school.fastjson;

import com.alibaba.fastjson.JSON;

public class Test1 {
	public static void main(String[] args) {
		UserInfo info = new UserInfo();
		info.setName("zhangsan");
		info.setAge(24);
		// 将对象转换为JSON字符串
		String str_json = JSON.toJSONString(info);
		System.out.println("JSON=" + str_json);
	}
}
